home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 535 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  755 b 

  1. Path: news.mtu.edu!not-for-mail
  2. From: sjang@mtu.edu (Saurabh Jang)
  3. Newsgroups: comp.lang.c++
  4. Subject: Question on null pointers
  5. Date: 4 Jan 1996 18:47:50 -0500
  6. Organization: Michigan Technological University
  7. Message-ID: <4chov6$ms@tamarack.cs.mtu.edu>
  8. NNTP-Posting-Host: tamarack.cs.mtu.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Hi,
  12.  
  13. ANSI C clearly allows constructs of the form
  14.  
  15. if ( p ) or if ( !p ) where p is a pointer variable. Is this legal in ANSI C++?
  16. Or is the preferred style if ( p != 0 ) or if ( p != NULL ) ?
  17.  
  18. Reading the ARM I felt that this topic was left ambiguous. Or did I miss
  19. something?
  20.  
  21.  
  22. -- 
  23. Saurabh Jang        e-mail:    sjang@cs.mtu.edu    
  24. MSCS Student        www   :    http://www.cs.mtu.edu/grads/Jang/Home.html
  25. Michigan Tech        work #: (906)487-2839
  26.